#include "ros/ros.h"
#include <std_msgs/Float64.h>
#include <std_msgs/String.h>
#include <sstream>
int main(int argc, char **argv)
{
   ros::init(argc, argv, "talker"); //the name of node
   ros::NodeHandle n,nh_para("~");
   ros::Publisher speed_pub = n.advertise<std_msgs::Float64>("/simulator/speed", 100);
   ros::Publisher cmd_pub = n.advertise<std_msgs::Float64>("/simulator/sw_cmd", 100);
   ros::Publisher udp_pub = n.advertise<std_msgs::String>("/udp/sub", 100);
   ros::Rate loop_rate(10);
   while (ros::ok())
   {
     std_msgs::Float64 speed;
     std_msgs::Float64 cmd;
     std_msgs::String udp_msg;

     speed.data = 10.0;
     cmd.data = 10.0;
     udp_msg.data = "hello udp!";
     //ROS_INFO("%s", speed.data);
     //ROS_INFO("%s", cmd.data);
     speed_pub.publish(speed);
     cmd_pub.publish(cmd);
     udp_pub.publish(udp_msg);
     ros::spinOnce();
     loop_rate.sleep();
   }
   return 0;
}
